﻿#nullable disable

using NewRetail.Application.Core.Entity;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace NewRetail.Application.Components.StoreValueCard.Entity
{
    /// <summary>
    /// 储值卡余额变化记录表
    /// </summary>
    public class CardBalanceChangeEntity : BaseEntity
    {
        /// <summary>
        /// 变化日期
        /// </summary>
        [Required]
        [MaxLength(15)]
        public string changeDate { get; set; }
        /// <summary>
        /// 变化时间
        /// </summary>
        [Required]
        [MaxLength(30)]
        public string changeDateTime { get; set; }
        /// <summary>
        /// 订单号
        /// </summary>
        [Required]
        [MaxLength(35)]
        public string outTradeNumber { get; set; }
        /// <summary>
        /// openid
        /// </summary>
        [MaxLength(50)]
        public string openId { get; set; }
        /// <summary>
        /// 会员号
        /// </summary>
        [Required]
        [MaxLength(50)]
        public string memberNo { get; set; }
        /// <summary>
        /// 会员Id
        /// </summary>
        [Required]
        [MaxLength(50)]
        public string memberId { get; set; }
        /// <summary>
        /// 来源类型(1:储值卡充值/退款   2:储值卡支付)
        /// </summary>
        [Required]
        public int sourceType { get; set; }
        /// <summary>
        /// 金额
        /// </summary>
        public decimal changeAmount { get; set; }
        /// <summary>
        /// 增加或减少金额标识(0:增加  1:减少)
        /// </summary>
        [Required]
        public int plusMinus { get; set; }
    }

    public enum EnumPlusMinus
    {
        [Description("增加")]
        Plus = 0,
        [Description("减少")]
        Minus = 1
    }
}
